package com.hundun.hddeal.util;

import com.auth0.jwt.JWT;

import javax.servlet.http.HttpServletRequest;

/**
 * 表头提取token信息
 */
public class TokenUtil {

    public static String getTokenById(HttpServletRequest request){
        String token=request.getHeader("token");
        String UserId = JWT.decode(token).getAudience().get(0);
        return UserId;
    }
}
